﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LTJ.Common;
using LTJ.Entity;
using LTJ.FrameWork;
using LTJ.Config;
using LTJ.Web.UI;
using System.Reflection;

namespace LTJ.WebPage.WebSite.customcontrol
{
    public partial class head : BaseWebControl
    {
        protected CompanyInfo cinfo = new CompanyInfo();

        public override void ShowUserControl()
        {
            GetUser();
            if (compid > 0)
            {
                cinfo = Companys.GetCompanyByID(compid);
            }

            if (SASRequest.IsPost() && userid <= 0)
            {
                string lname = SASRequest.GetFormString("loginName");
                string pwd = SASRequest.GetFormString("loginPwd");
                if (SASRequest.GetFormString("loginName") != "")
                {
                    string msg = UserLogin(lname, pwd);
                    if (msg != "")
                    {
                        AddScriptStr("alert('用户名密码错误');");
                    }
                }
            }
        }

    }
}